function submitModify(id) {
	var name = $.trim($("#name").val());
	var custName = $.trim($("#custName").val());
	var begin = $.trim($("#begin").val());
	var end = $.trim($("#end").val());
	var domain = $.trim($("#domain").val());
	var icp = $.trim($("#icp").val());
	var contact = $.trim($("#contact").val());
	var tel = $.trim($("#tel").val());
	var email = $.trim($("#email").val());
	var ip = $.trim($("#ip").val());
	var service = $.trim($("#service").val());
	var ispayee = $.trim($('input:radio[name="ispayee"]:checked').val());
	var alipayemail = $.trim($("#alipayemail").val());
	var alipaypartner = $.trim($("#alipaypartner").val());
	var alipaysecret = $.trim($("#alipaysecret").val());
	var alipayrate = $.trim($("#alipayrate").val());
	$.ajax({
		type : 'POST',
		url : "/oem/modify.json",
		dataType : "json",
		data : {
			id : id,
			name : name,
			custName : custName,
			begin : begin,
			end : end,
			domain : domain,
			icp : icp,
			contact : contact,
			tel : tel,
			email : email,
			ip : ip,
			service : service,
			ispayee : ispayee,
			alipayemail : alipayemail,
			alipaypartner : alipaypartner,
			alipaysecret : alipaysecret,
			alipayrate : alipayrate
		},
		success : function(data) {
			if (data && data.ok) {
				alert("修改成功！");
				// window.location.reload();
			} else {
				alert(data.msg);
			}
		},
		error : function(error) {
			alert("修改失败！");
		}
	});
}

function submitCreate() {
	var name = $.trim($("#name").val());
	var custName = $.trim($("#custName").val());
	var begin = $.trim($("#begin").val());
	var end = $.trim($("#end").val());
	var domain = $.trim($("#domain").val());
	var icp = $.trim($("#icp").val());
	var contact = $.trim($("#contact").val());
	var tel = $.trim($("#tel").val());
	var email = $.trim($("#email").val());
	var ip = $.trim($("#ip").val());
	var service = $.trim($("#service").val());
	var ispayee = $.trim($('input:radio[name="ispayee"]:checked').val());
	var alipayemail = $.trim($("#alipayemail").val());
	var alipaypartner = $.trim($("#alipaypartner").val());
	var alipaysecret = $.trim($("#alipaysecret").val());
	var alipayrate = $.trim($("#alipayrate").val());

	jQuery.ajax({
		type : 'POST',
		url : "/oem/add.json",
		dataType : "json",
		data : {
			name : name,
			custName : custName,
			begin : begin,
			end : end,
			domain : domain,
			icp : icp,
			contact : contact,
			tel : tel,
			email : email,
			ip : ip,
			service : service,
			ispayee : ispayee,
			alipayemail : alipayemail,
			alipaypartner : alipaypartner,
			alipaysecret : alipaysecret,
			alipayrate : alipayrate
		},
		success : function(data) {
			if (data && data.ok) {
				alert("添加成功！");
				window.location.reload();
			} else {
				alert(data.msg);
			}
		},
		error : function(error) {
			alert("添加失败！");
		}
	});
}